<form method="post" action="request.php">
<div data-role="content">
<div data-role="fieldcontain" class="ui-hide-label" class="center-wrapper">
<label for="subject">Concepte:</label>
<input type="text" id="subject" name="subject" value="<?php if( isset( $_GET['subject'] ) ) echo $_GET['subject']; ?>" placeholder="Concepte del pagament" data-inline="true" /><br /><br />
<label for="import">Import:</label>
<input type="text" id="import" name="import" value="<?php if( isset( $_GET['import'] ) ) echo $_GET['import']/100; ?>" placeholder="Import a repartir" data-inline="true"  /><br />
<input type="hidden" name="selected" id="selectedhidden" value="" />
<br />
</div>
<script type="text/javascript">
var selected = new Array();
var selectedstring;

$(document).bind('pageinit', function() {
	$('#friendlist').delegate('li', 'click', function () {
	    element_theme_refresh( $(this), 'c', 'b' );
	    console.log( $(this).find('.emaildata').text() );
	    if( $('#selectedhidden').val() == "" )
	      $('#selectedhidden').val( $(this).find('.emaildata').text() );
	    else
	    	$('#selectedhidden').val( $('#selectedhidden').val()+','+$(this).find('.emaildata').text() );
	});
});

function element_theme_refresh( element, oldTheme, newTheme ) {
	/* Update the page's new data theme. */
	if( $(element).attr('data-theme') ) {
	$(element).attr('data-theme', newTheme);
	}

	if( $(element).attr('class') ) {
	/* Theme classes end in "-[a-z]$", so match that */
	var classPattern = new RegExp('-' + oldTheme + '$');
	newTheme = '-' + newTheme;

	var classes = $(element).attr('class').split(' ');

	for( var key in classes ) {
	if( classPattern.test( classes[key] ) ) {
	classes[key] = classes[key].replace( classPattern, newTheme );
	}
	}

	$(element).attr('class', classes.join(' '));
	}
	}
</script>
<ul data-role="listview" id="friendlist" data-filter="true" data-filter-placeholder="Buscar amics..." data-filter-theme="c">
    <li data-icon="check"><a href="#">
        <img src="images/contacts/001.jpg" class="imagedata">
        <h3>Laura Belmonte</h3>
        <p class="emaildata">laurabelmonte@gmail.com</p>
		<p>670842352</p>
    </a></li>
    <li data-icon="check"><a href="#">
        <img src="images/contacts/002.jpg" title="sample"/>
        <h3>Enric Campmany</h3>
        <p class="emaildata">e.campmany@hotmail.com</p>
		<p>686469884</p>
    </a></li>
	    <li data-icon="check"><a href="#">
        <img src="images/contacts/003.jpg" title="sample"/>
        <h3>Eduard Cabestany</h3>
        <p class="emaildata">eduard534@gmail.com</p>
		<p>67612134</p>
    </a></li>
    <li data-icon="check"><a href="#">
        <img src="images/contacts/004.jpg" title="sample"/>
        <h3>Oriol Pérez</h3>
        <p class="emaildata">o.perez1022@gmail.com</p>
		<p>697582602</p>
    </a></li>
	    <li data-icon="check"><a href="#">
        <img src="images/contacts/005.jpg" title="sample"/>
        <h3>Artur Socías</h3>
        <p class="emaildata">artursocias@gmail.com</p>
		<p>686245321</p>
    </a></li>
    <li data-icon="check"><a href="#">
        <img src="images/contacts/006.jpg" title="sample"/>
        <h3>Noelia Lauren</h3>
        <p class="emaildata">noelia4124@hotmail.com</p>
		<p>670654987</p>
    </a></li>
	    <li data-icon="check"><a href="#">
        <img src="images/contacts/007.jpg" title="sample"/>
        <h3>Erica Toledano</h3>
        <p class="emaildata">erica.toledano@gmail.com<p>
		<p>686543546</p>
    </a></li>
    <li data-icon="check"><a href="#">
        <img src="images/contacts/008.jpg" title="sample"/>
        <h3>Montserrat Puig</h3>
        <p class="emaildata">montsepuig2244@gmail.com</p>
		<p>649159753</p>
    </a></li>
	    <li data-icon="check"><a href="#">
        <img src="images/contacts/009.jpg" title="sample"/>
        <h3>Natalia Otín</h3>
        <p class="emaildata">n.otin@cuatrecasas.com</p>
		<p>697852963</p>
    </a></li>
    <li data-icon="check"><a href="#">
        <img src="images/contacts/010.jpg" title="sample"/>
        <h3>Carlos Rodríguez</h3>
        <p class="emaildata">carlos.rodriguez@lacaixa.com</p>
		<p>696412545</p>
    </a></li>
		<li data-icon="check"><a href="#">
        <img src="images/contacts/011.jpg" title="sample"/>
        <h3>Blanca Martins</h3>
        <p>artur.socias@estudiant.upc.edu</p>
		<p>670842352</p>
    </a></li>
    <li data-icon="check"><a href="#">
        <img src="images/contacts/012.jpg" title="sample"/>
        <h3>Carlos Nuñez</h3>
        <p>carlosnunez@uab.cat</p>
		<p>678654872</p>
    </a></li>
	    <li data-icon="check"><a href="#">
        <img src="images/contacts/013.jpg" title="sample"/>
        <h3>Jordi Ortega</h3>
        <p>j.ortega@gmail.com</p>
		<p>697124356</p>
    </a></li>
    <li data-icon="check"><a href="#">
        <img src="images/contacts/014.jpg" title="sample"/>
        <h3>Pedro Nueno</h3>
        <p>pedro.nueno@iese.edu</p>
		<p>647564213</p>
    </a></li>
	    <li data-icon="check"><a href="#">
        <img src="images/contacts/015.jpg" title="sample"/>
        <h3>Ricard Piñol</h3>
        <p>ricardpinol@ibm.com</p>
		<p>645321587</p>
    </a></li>
    <li data-icon="check"><a href="#">
        <img src="images/contacts/016.jpg" title="sample"/>
        <h3>Carlos Rodríguez</h3>
        <p>c.rodriguez@gestoriacc.com</p>
		<p>697750631</p>
    </a></li>
	    <li data-icon="check"><a href="#">
        <img src="images/contacts/017.jpg" title="sample"/>
        <h3>Ross Mosby</h3>
        <p>r.moss@nhill.ie</p>
		<p>687459257</p>
    </a></li>
	    <li data-icon="check"><a href="#">
        <img src="images/contacts/018.jpg" title="sample"/>
        <h3>Jorge Sevillano</h3>
        <p>j.sevillano@laginesta.com</p>
		<p>670842352</p>
    </a></li>
    <li data-icon="check"><a href="#">
        <img src="images/contacts/019.jpg" title="sample"/>
        <h3>María Martínez</h3>
        <p>mmartinez@gmail.com</p>
		<p>687541324</p>
    </a></li>
	    <li data-icon="check"><a href="#">
        <img src="images/contacts/020.jpg" title="sample"/>
        <h3>Dann Cutter</h3>
        <p>danncutter@gmail.com</p>
		<p>686213458</p>
    </a></li>
</ul><br />
<label for="additionalemail">Email:</label>
<input type="text" id="additionalemail" name="additionalemail" value="" /><br /><br />

</div>
<div data-role="footer" data-position="fixed">
  <input type="submit" data-role="button" data-theme="b" data-icon="arrow-r" data-iconpos="right" data-inline="false" value="Pas següent">
</div>
</form>